### Examples ------------------------------------------------------------------

# Load data, best to manually combine the csvs first
UKHR <- LoadData("C:/UKHR/CSV/")

# Create a selection
select.Cassiopeia = quote(
  Country == "GB" &
  Ratings.Position <= 2 &
  Race.Type == "Flat" &
  Class.Diff..Difference > 0 &
  Win.Value.Ratio > 1 &
  Stall.Percentage >= 10
)

# Make a single report of the selection
test <- MakeReport(SelectData(select.Cassiopeia))
test

# Make multiple reports, and save to a csv
system.time(test <- MakeReports(SelectData(select.Cassiopeia)))
test
write.table(test, file="test.csv", sep=",", row.names = FALSE)


# Make multiple reports, for each race type, and save to a csv
system.time(test <- MakeAllReports(SelectData(select.Cassiopeia)))
test
write.table(test, file="testall.csv", sep=",", row.names = FALSE)

# Hot list
hotlist <- test[Runs > 100 &
                SR > 12 &
                Lvl.ROI > 12 &
                Prp.Bank > 300]

# DD hot list
ddhotlist <- test[Runs > 100 &
                  Lvl.Largest.Drop < 35 &
                  Prp.Largest.Drop.Percentage < 35]